import { Vector } from "../util";
import { Base, Tuple } from "./Base";

export class BaseAbility extends Base {

    public ability_icon: number
    public kv = {}


    //技能释放类型 1,2,3,4,6 普攻 主动  被动 建造 采集
    public ability_cast_type = 2
    //技能指示器类型 0~7
    public sight_type = 4
    //指示器半径 100为单
    public sector_radius: Vector = [10]
    //指示器角度
    public sector_angle: Vector = [0]
    //指示器长度 100为单位
    public arrow_length: Vector = [5]
    //指示器宽度 100为单位
    public arrow_width: Vector = [2]
    //圆指示器半径 100为单位
    public circle_radius: Vector = [5]
    //释放范围  100为单位
    public ability_cast_range: Vector = [10]
    //施法打断范围 100为单位
    public ability_break_cast_range: Vector = [50]
    //技能影响范围 100为单位
    public ability_damage_range: Vector = [0]


    //是否近战
    public is_meele = false
    //是否立即施法
    public is_immediate = false
    //是否超出范围可以施法
    public release_immediately_out_of_range = false
    //是否自动转身
    public need_turn_to_target = true
    //是否为蓄力技能
    public is_charge_ability = false
    //技能是否受冷却缩减影响
    public influenced_by_cd_reduce = true
    //是否可以缓存
    public can_cache = true
    //前置条件
    public precondition_list: Tuple
    //是否自动释放
    public is_autocast = false


    //技能伤害
    public ability_damage: Vector = [5]
    //技能消耗
    public ability_cost: Vector = [5]
    //消耗生命值释放
    public can_cost_hp = false
    //释放时消耗的生命值
    public ability_hp_cost: Vector = [0]
    //生命不足时能否释放
    public can_cast_when_hp_insufficient = false
    //消耗生命是否致死
    public cost_hp_can_die = false
    //玩家属性消耗
    public player_props_cost = {}
    //最大充能数
    public ability_max_stack_count: Vector = [0]
    //充能恢复时间
    public ability_stack_cd: Vector = [0]
    //冷却时间 
    public cold_down_time: Vector = [5]
    //技能最大等级
    public ability_max_level = 1
    //允许学习等级
    public required_level: {
        "formula": "",
        "required_levels": Tuple
    }

    //施法开始时间
    public ability_cast_point = 0.2
    //施法引导时间
    public ability_prepare_time = 0.0
    //施法出手时间
    public ability_channel_time = 0.0
    //施法成时间 
    public ability_bw_point = 0.5
    //施法开始可以被打断
    public can_ps_interrupt = true
    //施法引导可以被打断
    public can_prepare_interrupt = false
    //施法出手可以被打断
    public can_cast_interrupt = false
    //施法完成可以被打断
    public can_bs_interrupt = true
    //技能可以打断其他技能
    public can_interrupt_others = true
    //移动可以打断技能
    public influenced_by_move = true

    //索敌按阵营选取 1 2 4 8
    public filter_condition_camp = 5
    //索敌按类型选取 1 2 4 32 256
    public filter_condition_type = 7
    //索敌按单位标签选取
    public filter_unit_tags: Tuple
    //索敌按物品标签选取
    public filter_item_tags: Tuple
    //索敌按可破坏物标签选取
    public collection_destructible_tags: Tuple
    //索敌按特殊筛选 2 4 16 256
    public target_attribute = 0


    //建造相关 建造单位
    public build_list: Tuple
    //建造角度
    public build_rotate = 0


    //采集相关
    //采集动画
    public collection_animation = ""
    //是否循环播放采集动画
    public collection_animation_loop = true
    //采集获得的数量
    public pick_count = 1
    //是否自动拾取
    public auto_pick = true
    //是否连续采集
    public collection_continuously = true

    //声音事件列表
    public sound_event_list: Tuple

    public bs_sfx_list: Tuple
    public bs_sound_effect: Tuple
    public building_attack_range_sfx = 101492
    public bw_ignore_ability_command = false
    public bw_ignore_move_command = false
    public bw_move_interrupt = true
    public camp_priority_enemy = 1
    public camp_priority_friend = 1
    public camp_priority_neutral = 1
    public camp_priority_self = 1
    public cast_ignore_ability_command = true
    public cast_ignore_move_command = true
    public cast_move_interrupt = false
    public csp_ignore_ability_command = false
    public csp_ignore_move_command = false
    public csp_move_interrupt = true
    public cst_sfx_list: Tuple

    public cst_sound_effect: Tuple
    public end_sfx_list: Tuple
    public end_sound_effect: Tuple
    public hit_sfx_list: Tuple
    public hit_sound_effect: Tuple
    public magicbook_list: Tuple
    public prepare_ignore_ability_command = true
    public prepare_ignore_move_command = true
    public prepare_move_interrupt = false
    public ps_sfx_list: Tuple
    public ps_sound_effect: Tuple
    public sector_radian = 2
    public show_building_attack_range = false
    public sp_count_down = false
    public sp_sfx_list: Tuple
    public sp_sound_effect: Tuple
    public type_priority_building = 1
    public type_priority_creature = 1
    public type_priority_destructible = 1
    public type_priority_hero = 1
    public type_priority_item = 1
}